Casper CBC: Message validation implementations
When sending or receiving message, each validator checks that
the estimate given matches the estimate we would generate from the same justification.
validator.estimate(justification) == estimate
the same sender was not referenced twice in the same set of justifications.
the history list of the received message matches the already known message list (e.g. no fork)
if at least one of the justification of received message A is not included in justified messages, the corresponding justifications and A itself are marked as pending
pending message A is unmarked when receiving the messages whose justifications includes all unjustified justifications of A.
Each Message has sequence_number added by validator, and if the sequence number of justified message is larger than existing latest messages’ from the same sender, the message is added to latest messages.
Memo
In original paper justification of message means sender's state, but on the other hand in JS and python implementation's one means sender's latest messages of each validator. so the receiver need to reconstruct sender's state by latest messages in received message and message history stored in receiver.
To do this, check that the history list of the received message matches the already known message list